import java.util.Comparator;

/**We need to print the large itemset by the order of their support.
 * Since that we define the natural order by their lexcial order,
 * we need to implement a new comparator.
 * */
public class counComparator implements Comparator {

	public int compare(Object o1, Object o2) {
		Itemset iSet1=(Itemset) o1;
		Itemset iSet2=(Itemset) o2;
		
		if(iSet1.getSup()>iSet2.getSup()){
			return -1;
		}else if(iSet1.getSup()<iSet2.getSup()){
			return 1;
		}else{
			return 0;
		}
	}

}
